package com.jic.manager.mapper;

import com.alibaba.fastjson.JSONObject;
import com.jic.manager.entity.Merchant;
import com.jic.manager.request.rest.MerchantRestRequest;
import com.jic.manager.response.MemMerchantInfoResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 商家表
 * @author : 
 * @email : 
 * @since : 2020-02-26 09:40:44
 * @version : v1.0.0
 */
@Repository
@Mapper
public interface  MerchantMapper {

    long insert(Merchant merchant);

    long delete(Long id);

    long update(Merchant merchant);

    Merchant queryByPrimaryKey(Long id);

    List<Merchant> query(Merchant merchant);

    List<Merchant> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("merchant") Merchant merchant);

    long queryPageCount(@Param("merchant") Merchant merchant);

    MemMerchantInfoResponse getShopList(@Param("merchantId") Long merchantId);

    List<Merchant> queryPageMerchant(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("merchant") Merchant merchant);

    long queryPageMerchantCount(@Param("merchant") Merchant merchant);

    Merchant getByThirdMerchantCode(@Param("thirdMerchantCode")String thirdMerchantCode);

    List<Merchant> queryMerchantListByid(@Param("merchantList") List<Long> merchantList);

    List<Merchant> queryMerchantPageOther(@Param("merchant")Merchant merchant);

    MemMerchantInfoResponse getGrowhtScopeInfo(Long merchantId);

    Merchant syncQueryMerchantByCode(@Param("merchantRestRequest")MerchantRestRequest merchantRestRequest);

    List<MemMerchantInfoResponse> getMerchantList(@Param("deptIds") List<Long> deptIds);

    List<JSONObject> getMerchantToSett();
}